﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using WoChu.RfClient.Duty.IFace;
using WoChu.RfClient.Entity;

namespace WoChu.RfClient.Duty
{
    public class PublicUIRule : IPublic
    {
        private static PublicUIRule _NewInstance = new PublicUIRule();

        public static PublicUIRule NewInstance
        {
            get
            {
                if (_NewInstance == null)
                {
                    _NewInstance = new PublicUIRule();
                }

                return _NewInstance;
            }
        }
        public ResultModel<List<LookupItem>> GetLookUpItemList(string LookupName)
        {
            try
            {
                ResultModel<List<LookupItem>> _result = WoChu.CF.BaseFrame.WebClient.WebGetHelper<IPublic>.NewInstance.InvokeWebMethod<ResultModel<List<LookupItem>>>("GetLookUpItemList", new object[] { LookupName });
                if (_result == null)
                    return new ResultModel<List<LookupItem>>().GetInstance();
                return _result;
            }
            catch (Exception ex)
            {
                WoChu.CF.BaseFrame.Util.MessageBoxEx.Show(ex);
                return new ResultModel<List<LookupItem>>().GetInstance();
            }
        }
    }
}
